home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / inventorTemplates1.1.2 / RecordClass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.0 KB  |  70 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef RECORDCLASS_H
  18. #define RECORDCLASS_H
  19.  
  20. #include <audio.h>
  21. #include <audiofile.h>
  22.  
  23. class RecordClass {
  24.  
  25.   private:
  26.     long frames_per_sec;
  27.     long bits_per_samp;
  28.     long samps_per_frame;
  29.     long time_limit_specified;
  30.     double time_limit;
  31.     long compression;
  32.     long filefmt;
  33.  
  34.     void set_defaults();
  35.     void record_audio(ALport, AFfilehandle);
  36.     static void go(void *);
  37.  
  38.     char  *filename;        /* input file name */
  39.     char  *myname;
  40.     int   fd;        /* input file descriptor */
  41.     short verbose;        /* global flag */
  42.     short quiet;             /* global flag */
  43.     short fork;
  44.     short cilmi;        /* flag set when process ready to be killed */
  45.     int   audio_pid;
  46.     short caught_sigint;
  47.     int  beginRecording(); /* start recording without forking a separate
  48.                               process */
  49.     short isLive;
  50.  
  51.   public:
  52.     RecordClass(char *, char *);
  53.     ~RecordClass();
  54.     void setFrames(long);
  55.     void setBits(long);
  56.     void setSamps(long);
  57.     void setTimeLimit(float);
  58.     void setCompression(char *);
  59.     void setFormat(char *);
  60.     void setFilename(char *);
  61.     void setVerbose(short);
  62.     void setQuiet(short);
  63.     int  start(); // record with forking off another process
  64.     void stop();  // kill other process
  65.     short getIsLive();
  66.  
  67. };
  68.  
  69. #endif
  70.